<template>
  <div>
    <h1>app</h1>
    <xiao-tou></xiao-tou>
    <zhong-tou></zhong-tou>
  </div>
</template>

<script>
import XiaoTou from "./components/XiaoTou.vue";
import ZhongTou from "./components/ZhongTou.vue";
export default {
  name: "",
  props: [""],
  data() {
    return {
      info: "app上的信息",
    };
  },

  components: { XiaoTou, ZhongTou },
  // provide既可以写成对象的格式，也可以写成函数的格式
  // provide为对象格式时，this不指向当前组件对象，函数格式时this指向当前组件对象
  /*  provide: {
    msg: "头头传递，请分清哪个头",
    // testInfo: this.info,
  }, */
  provide() {
    return {
      msg: "头头传递，请分清哪个头",
      testInfo: this.info,
    };
  },
  computed: {},

  beforeMount() {},

  mounted() {},

  methods: {},

  watch: {},
};
</script>
<style lang='' scoped>
</style>